﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KeywordAuction.Simulation
{
    public class DoubleKeywordAdvertiser :Advertiser
    {
        public DoubleKeywordAdvertiser()
        {
            this.Strategies.Add(new KeywrodStrategyRaiseHold());
            this.Strategies.Add(new KeywrodStrategyHoldRaise());
            this.Strategies.Add(new KeywrodStrategyHoldDrop());
            this.Strategies.Add(new KeywrodStrategyDropRaise());
            this.Strategies.Add(new KeywrodStrategyDropHold());
            this.Strategies.Add(new KeywordStrategyRaiseAll());
            this.Strategies.Add(new KeywordStrategyHoldAll());
            this.Strategies.Add(new KeywordStrategyDropAll());
            this.Strategies.Add(new KeywrodStrategyRaiseDrop());


            //this.Strategies.Add(new strate
        }

        public DoubleKeywordAdvertiser CreateDoubleKeywordAdvertiser(AuctionHost host)
        {
            var advertiser = new DoubleKeywordAdvertiser();
            foreach (var item in host.Adspots)
            {
                var bid = AdvertiserBidding.CreateAdvertiserBidding(advertiser, item);
                advertiser.Biddings.Add(bid);
                item.Bitting.Add(bid);

                bid.ExpectedRevenue = new Random().Next(10, 100);
            }
            advertiser.AttendingAuction = host;
            return advertiser;
        }
    }
}
